//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package org.jim.core.packets;

import com.alibaba.fastjson.JSONObject;

import java.time.LocalDateTime;
import java.util.Date;

public class GpsBody extends Message {
    String gpsType;
    private String userId;
    private String serialNumber;
    private Integer networkType;
    private double longitude;
    private double latitude;
    private Double elevation;
    private Double speed;
    private Integer direction;
    private Double accuracy;
    private String locationType;
    private String address;

    private Date gpsTime;
    private Date reportTime;

    public Date getGpsTime() {
        return gpsTime;
    }

    public void setGpsTime(Date gpsTime) {
        this.gpsTime = gpsTime;
    }

    public Date getReportTime() {
        return reportTime;
    }

    public void setReportTime(Date reportTime) {
        this.reportTime = reportTime;
    }

    private boolean inGrid = false;

    public String getGpsType() {
        return gpsType;
    }

    public void setGpsType(String gpsType) {
        this.gpsType = gpsType;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getSerialNumber() {
        return serialNumber;
    }

    public void setSerialNumber(String serialNumber) {
        this.serialNumber = serialNumber;
    }

    public GpsBody() {
        this.scope = "gps";
    }

    public GpsBody(String appId, String id, Integer networkType, double longitude, double latitude, Double elevation, Double speed, Integer direction, Double accuracy, String locationType, String address, Integer cmd, Long createTime, JSONObject extras) {
        this.appId = appId;
        this.scope = "gps";
        this.id = id;
        this.networkType = networkType;
        this.longitude = longitude;
        this.latitude = latitude;
        this.elevation = elevation;
        this.speed = speed;
        this.direction = direction;
        this.accuracy = accuracy;
        this.locationType = locationType;
        this.address = address;
        this.cmd = cmd;
        this.createTime = createTime;
        this.extras = extras;
    }

    public boolean isInGrid() {
        return this.inGrid;
    }

    public void setInGrid(boolean inGrid) {
        this.inGrid = inGrid;
    }

    public Integer getNetworkType() {
        return this.networkType;
    }

    public void setNetworkType(Integer networkType) {
        this.networkType = networkType;
    }

    public double getLongitude() {
        return this.longitude;
    }

    public void setLongitude(double longitude) {
        this.longitude = longitude;
    }

    public double getLatitude() {
        return this.latitude;
    }

    public void setLatitude(double latitude) {
        this.latitude = latitude;
    }

    public Double getElevation() {
        return this.elevation;
    }

    public void setElevation(Double elevation) {
        this.elevation = elevation;
    }

    public Double getSpeed() {
        return this.speed;
    }

    public void setSpeed(Double speed) {
        this.speed = speed;
    }

    public Integer getDirection() {
        return this.direction;
    }

    public void setDirection(Integer direction) {
        this.direction = direction;
    }

    public Double getAccuracy() {
        return this.accuracy;
    }

    public void setAccuracy(Double accuracy) {
        this.accuracy = accuracy;
    }

    public String getLocationType() {
        return this.locationType;
    }

    public void setLocationType(String locationType) {
        this.locationType = locationType;
    }

    public String getAddress() {
        return this.address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public static Builder newBuilder() {
        return new Builder();
    }

    public static class Builder extends Message.Builder<GpsBody, Builder> {
        private Integer networkType;
        private double longitude;
        private double latitude;
        private Double elevation;
        private Double speed;
        private Integer direction;
        private Double accuracy;
        private String locationType;
        private String address;

        public Builder() {
        }

        public Builder networkType(Integer networkType) {
            this.networkType = networkType;
            return this;
        }

        public Builder longitude(double longitude) {
            this.longitude = longitude;
            return this;
        }

        public Builder latitude(double latitude) {
            this.latitude = latitude;
            return this;
        }

        public Builder elevation(Double elevation) {
            this.elevation = elevation;
            return this;
        }

        public Builder speed(Double speed) {
            this.speed = speed;
            return this;
        }

        public Builder direction(Integer direction) {
            this.direction = direction;
            return this;
        }

        public Builder accuracy(Double accuracy) {
            this.accuracy = accuracy;
            return this;
        }

        public Builder locationType(String locationType) {
            this.locationType = locationType;
            return this;
        }

        public Builder address(String address) {
            this.address = address;
            return this;
        }

        protected Builder getThis() {
            return this;
        }

        public GpsBody build() {
            return new GpsBody(this.appId, this.id, this.networkType, this.longitude, this.latitude, this.elevation, this.speed, this.direction, this.accuracy, this.locationType, this.address, this.cmd, this.createTime, this.extras);
        }
    }
}
